#ifndef BOOK_H
#define BOOK_H

#include<QSqlDatabase>
#include <QWidget>
#include "userpage.h"
#include "bookmana.h"
#include "bormane.h"
#include "borhispage.h"
#include "userhis.h"
#include <QStandardItemModel>

namespace Ui {
class book;
}

class book : public QWidget
{
    Q_OBJECT

public:
//    explicit book(QWidget *parent = nullptr);
    explicit book(QSqlDatabase &d,QString InId);
    ~book();


    virtual void closeEvent(QCloseEvent *event);//虚函数，对象调用的时候自动调用该函数
    //派生类可以重写他

private slots:

    void on_closeBut_clicked();

    void on_backBut_clicked();

private:
    Ui::book *ui;
    QSqlDatabase &db;
    QString meId;
    void initPage();
    UserPage *userPage;
    borhispage *borPage;
    UserHis *userHisPage;
    void dealMeun();
};

#endif // BOOK_H

